package com.ruoyi.web.controller.exchange;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.jianqiao.delivery.exchange.domain.vo.ExchangeVo;
import com.jianqiao.delivery.exchange.domain.vo.SelectCurrenciesParam;
import com.jianqiao.delivery.exchange.service.ExchangeService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * author: cyx
 * create: 2024/10/18 11:42
 **/
@RestController
@RequestMapping("/exchange")
public class ExchangeController {

    @Autowired
    private ExchangeService exchangeService;

    @PostMapping("/getExchange")
    public AjaxResult getExchange(@RequestBody SelectCurrenciesParam currenciesParam) throws JsonProcessingException {
        AjaxResult exchange = exchangeService.getExchange(currenciesParam);
        return exchange;
    }
}
